home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Extensions… / Additions ƒ / InitializeMessage.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-14  |  1.5 KB  |  87 lines  |  [TEXT/MPS ]

  1. /* ------------------------------------------------------------------------------
  2.  
  3.     FILENAME
  4.         InitializeMessage.c
  5.  
  6.     DESCRIPTION
  7.         This file contains the message procedure that will be invoked when the Printing Manager
  8.         issues the Initialize message.
  9.  
  10.     COPYRIGHT
  11.         Copyright Apple Computer, Inc. 1991 - 1996
  12.         All rights reserved. 
  13.     
  14.     INTERFACE ROUTINES
  15.         InitializeMessageProc
  16.  
  17.     MODIFICATION HISTORY
  18.         12/03/91            Sam Weiss        Initial Implementation
  19.          6/14/96            cn                    Updated to support Universal Interfaces 2.1.
  20.  
  21.  
  22. ------------------------------------------------------------------------------- */
  23.  
  24. #include <Types.h>
  25. #include <Quickdraw.h>
  26. #include <Memory.h>
  27. #include <Resources.h>
  28. #include <Dialogs.h>
  29. #include <TextEdit.h>
  30. #include <OSUtils.h>
  31. #include <Packages.h>
  32. #include <ToolUtils.h>
  33. #include <Menus.h>
  34. #include <String.h>
  35. #include <Strings.h>
  36. #include <Printing.h>
  37. #include <FixMath.h>
  38.  
  39. #include <GXGraphics.h>
  40.  
  41. #include <Collections.h>
  42. #include <GXMessages.h>
  43.  
  44. #include    <GXPrinting.h>
  45.  
  46. #include    "Additions.h"
  47.  
  48.  
  49. extern long A5Size (void);
  50. extern void A5Init (void *);
  51.  
  52.  
  53. // Globals...
  54.  
  55.  
  56. gxShape gSerialShape;
  57.  
  58.  
  59. //------------------------------------------------------------------------------------
  60.  
  61. /*
  62.     Name:                    InitializeMessageProc
  63.     
  64.     Description:        Initialize the universal driver.
  65.  
  66.     Parameters:            long:                unused context
  67.     
  68.     Returns:                OSErr
  69.     
  70.     Preconditions:        none
  71.                                 
  72.     Postconditions:    none
  73.     
  74. */
  75.  
  76. OSErr InitializeMessageProc (void) {
  77.  
  78.     OSErr anErr;
  79.     
  80.     anErr = NewMessageGlobals(A5Size(), A5Init);
  81.     
  82.     if (!anErr)
  83.         gSerialShape = NULL;
  84.     
  85.     return anErr;
  86. }
  87.